#ifndef ___STUDENT_HEADER__
#define ___STUDENT_HEADER__

#include <string>
#include <iostream>
#include <fstream>
using std::string;
using std::istream;
using std::ostream;
using std::ifstream;
using std::ofstream;


struct Courses
{
    float zh_;
    float mt_;
    float en_;

    friend istream& operator>>(istream& is, Courses& c);
    friend ostream& operator<<(ostream& os, const Courses& c);

    friend ifstream& operator>>(ifstream& ifs, Courses& c);
    friend ofstream& operator<<(ofstream& ofs, const Courses& c);
};

struct Student 
{
    typedef unsigned long sid;

    sid             id_;
    string          name_;
    string          gender_;
    Courses         scores_;

    friend istream& operator>>(istream& is, Student& s);
    friend ostream& operator<<(ostream& os, const Student& s);

    friend ifstream& operator>>(ifstream& ifs, Student& s);
    friend ofstream& operator<<(ofstream& ofs, const Student& s);
};

#endif//#ifndef ___STUDENT_HEADER__
